import { createStore, applyMiddleware, compose } from 'redux'
import thunkMiddleware from 'redux-thunk'
import { combineReducers } from 'redux-immutablejs'
import Immutable from 'immutable'

import rootReducer from '../reducers'


const createStoreWithMiddleware = applyMiddleware(
  thunkMiddleware
)(createStore)

const state = Immutable.fromJS({})
const store = rootReducer(state)

export default function configureStore(store) {
  return createStoreWithMiddleware(rootReducer, store);
}
